package com.meaningful.design_pattern.composite_pattern.expression;

public class Main {

    public static void main(String[] args) throws Exception {
        ExpressionParser expressionParser = new ExpressionParser("1+15*(9+4+(1+5))+6");
        Expression parse = expressionParser.parse();
        System.out.println(1 + 15 * (9 + 4 + (1 + 5)) + 6);
        System.out.println(parse.getValue());
    }

}
